package com.xuecheng.checkcode.controller;

import com.xuecheng.checkcode.feignclient.AuthServiceClient;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@Api(value = "手机号发送验证码",tags = "手机号发送验证码")
@RestController
public class SmsController {
    @Autowired(required = false)
    AuthServiceClient authServiceClient;


    @ApiOperation("发送验证码")
    @PostMapping("/phone")
    public  void sendSms(String param1)  {
        log.info("调用远程服务发送验证码：{}",param1);
        authServiceClient.sendSms(param1);
    }

}
